<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:javascript library="autentication" />
        <title><g:message code="login" default="LOGIN" /></title>
    </head>
    <body>
    	<h1><g:message code="login" default="LOGIN" /></h1>
        <div class="body roundedCorners">
            <g:if test="${flash.message}">
          		<div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
            </g:if>
            
            <g:hasErrors bean="${userInstance}">
	            <div class="errors"><g:renderErrors bean="${userInstance}" as="list" /></div>
            </g:hasErrors>
            
            <g:form controller="autenticate" action="login">
			   	<table>
   					<tr class="prop">
	                    <td valign="top" class="name">
	                        <label for="alias"><g:message code="user.alias" default="ALIAS" />:</label>
	                    </td>
	                    <td valign="top" class="value ${hasErrors(bean: userInstance, field: 'alias', 'errors')}">
	                        <g:textField id="alias" name="alias" value="${fieldValue(bean: userInstance, field: 'alias')}" />
	                    </td>
	                </tr>
	                <tr class="prop">
	                    <td valign="top" class="name">
	                        <label for="password"><g:message code="user.password" default="PASSWORD" />:</label>
	                    </td>
	                    <td valign="top" class="value ${hasErrors(bean: userInstance, field: 'password', 'errors')}">
	                        <g:passwordField name="password" value="${fieldValue(bean: userInstance, field: 'password')}" />
	                    </td>
	                </tr>
	            </table>
	            <div class="buttons">
	            	<span class="button"><g:actionSubmit class="login" action="login" value="${message(code: 'login', 'default': 'LOGIN')}" /></span>
	            	<span class="button"><g:actionSubmit class="cancel" action="cancel" value="${message(code: 'cancel', 'default': 'CANCEL')}" /></span>
	            	<span class="button"><g:actionSubmit class="reminderPassword" action="reminderPassword" value="${message(code: 'reminder.password', 'default': 'REMINDER PASSWORD')}" /></span>
            	</div>
            </g:form>
        </div>
    </body>
</html>
